package com.hnevc.interfacerecall;

import java.util.Random;

public class Care {
	OnCareOkListener listener;
	public Care(OnCareOkListener listener){
		this.listener = listener;
	}
	public void takeCare(){
		Random random = new Random();
		int growth = random.nextInt(4);
		String[] careMethod= {"浇水","施肥","松土","晒太阳"};
		listener.updateLength(growth);
		System.out.println("植物养护:"+careMethod[growth]+",高度增加"+growth);
	}
	
}
